<html>
<body>
<h1>Javac Plugin</h1>
<p>
    The Javac plugin compiles java source code
</p>


<div id="after-summary">
<p><b>Compilation paths:</b></p>
<p>The Javac Plugin will automatically add project dependencies to the compilation class path.
See the lifecycle plugin help for information on how these paths are resolved.</p>

<p><b>Properties: </b> (Common to all targets)</p>
<ul>
<li>
    <b>srcDir</b> <i>Mandatory.</i> Location of the java files.
</li>

<li>
    <b>bootClassPath</b> <i>Optional.</i> Location of bootstrap class files.
</li>

<li>
    <b>bootClassPathRef</b> <i>Optional.</i> Location of bootstrap class files, given as a
        reference to a path defined elsewhere.
</li>
<li>
    <b>extDirs</b> <i>Optional.</i> Location of installed extensions.
</li>
<li>
    <b>encoding</b> <i>Optional.</i>Encoding of source files. (Note: gcj doesn't support
        this option yet.)
</li>

<li>
    <b>noWarn</b> <i>Optional.</i> Indicates whether the <code>-nowarn</code> switch
        should be passed to the compiler; defaults to <code>off</code>.
</li>

<li>
    <b>debug</b> <i>Optional.</i> Indicates whether source should be compiled with
        debug information; defaults to <code>off</code>. If set to
        <code>off</code>, <code>-g:none</code> will be passed on the
        command line for compilers that support it (for other compilers, no
        command line argument will be used). If set to <code>true</code>,
        the value of the <code>debugLevel</code> attribute determines the
        command line argument.
</li>
<li>
    <b>debugLevel</b> <i>Optional.</i> Keyword list to be appended to the <code>-g</code>
        command-line switch. This will be ignored by all implementations except
        <code>modern</code>, <code>classic(ver &gt;= 1.2)</code> and <code>jikes</code>.
        Legal values are <code>none</code> or a comma-separated list of the
        following keywords:
        <code>lines</code>, <code>vars</code>, and <code>source</code>.
        If <code>debugLevel</code> is not specified, by default,
        nothing will be
        appended to <code>-g</code>. If <code>debug</code> is not turned on,
        this attribute will be ignored.
</li>
<li>
    <b>optimize</b> <i>Optional.</i> Indicates whether source should be compiled with
        optimization; defaults to <code>off</code>. <strong>Note</strong>

        that this flag is just ignored by Sun's <code>javac</code> starting
        with JDK 1.3 (since compile-time optimization is unnecessary).
</li>
<li>
    <b>deprecation</b> <i>Optional.</i> Indicates whether source should be compiled with
        deprecation information; defaults to <code>off</code>.
</li>
<li>
    <b>target</b> <i>Optional.</i> Generate class files for specific VM version
        (e.g., <code>1.1</code> or <code>1.2</code>). <b>Note:</b> the
        default value depends on the JVM that is running Ant. In
        particular, if you use JDK 1.4+ the generated classes will not be
        usable for a 1.1 Java VM unless you explicitly set this attribute
        to the value 1.1 (which is the default value for JDK 1.1 to
        1.3). We highly recommend to always specify this
        attribute.
</li>
<li>
    <b>verbose</b> <i>Optional.</i> Asks the compiler for verbose output; defaults to
        <code>no</code>.
</li>
<li>
    <b>depend</b> <i>Optional.</i> Enables dependency-tracking
        for compilers that support this (<code>jikes</code> and
        <code>classic</code>).
</li>
<li>
    <b>fork</b> <i>Optional.</i> Whether to execute <code>javac</code> using the
        JDK compiler externally; defaults to <code>no</code>.
</li>
<li>
    <b>executable</b> <i>Optional.</i> Complete path to the <code>javac</code>
        executable to use in case of <code>fork=&quot;yes&quot;</code>.
        Defaults to the compiler of the Java version that is currently
        running Ant. Ignored if <code>fork=&quot;no&quot;</code>.<br/>

        Since Ant 1.6 this attribute can also be used to specify the
        path to the executable when using jikes, jvc, gcj or sj.
</li>
<li>
    <b>memoryInitialSize</b> <i>Optional.</i> The initial size of the memory for the underlying VM,
        if <code>javac</code> is run externally; ignored otherwise. Defaults
        to the standard VM memory setting.
        (Examples: <code>83886080</code>, <code>81920k</code>, or
        <code>80m</code>)
</li>
<li>
    <b>memoryMaximumSize</b> <i>Optional.</i> The maximum size of the memory for the underlying VM,
        if <code>javac</code> is run externally; ignored otherwise. Defaults
        to the standard VM memory setting.
        (Examples: <code>83886080</code>, <code>81920k</code>, or
        <code>80m</code>)
</li>
<li>
    <b>failOnError</b> <i>Optional.</i> Indicates whether compilation errors
        will fail the build; defaults to <code>true</code>.
</li>
<li>
    <b>source</b> <i>Optional.</i> Value of the <code>-source</code> command-line
        switch; will be ignored by all implementations prior to
        <code>javac1.4</code> (or <code>modern</code> when Ant is not
        running in a 1.3 VM) and <code>jikes</code>.<br/> If you use this
        attribute together with <code>jikes</code>, you must make sure
        that your version of jikes supports the <code>-source</code>

        switch. By default, no <code>-source</code> argument will be used
        at all.
        <b>Note: </b> the default value depends on the JVM that is running
            Ant. We highly recommend to always specify this
            attribute.
</li>
<li>
    <b>compiler</b> <i>Optional.</i> The compiler implementation to use.
        If this attribute is not set, the value of the
        <code>build.compiler</code> property, if set, will be used.
        Otherwise, the default compiler for the current VM will be used.
        (See the above <a href="#compilervalues">list</a> of valid
        compilers.)
</li>
<li>
    <b>listFiles</b> <i>Optional.</i> Indicates whether the source files to be compiled will
        be listed; defaults to <code>no</code>.
</li>
<li>
    <b>tempDir</b> <i>Optional.</i> Where Ant should place temporary files.
        This is only used if the task is forked and the
        command line args length exceeds 4k.
        <em>Since Ant 1.6</em>.
</li>
<li>
    <b>destDir</b> <i>Optional.</i> Location to store the class files.
</li>
<li>
    <b>compilerArgs</b> <i>Optional.</i> Command line arguements for the compiler.
</li>
</ul>

<b>Compilers</b>
<p>It is possible to use different compilers. This can be specified by
    either setting the global <code>build.compiler</code> property, which will
    affect all <code>&lt;javac&gt;</code> tasks throughout the build, or by
    setting the <code>compiler</code> attribute, specific to the current
    <code>&lt;javac&gt;</code> task.

    <a name="compilervalues"><span/></a>Valid values for either the
        <code>build.compiler</code> property or the <code>compiler</code>
        attribute are:
</p>
<ul>
    <li><code>classic</code> (the standard compiler of JDK 1.1/1.2)
        <code>javac1.1</code> and
        <code>javac1.2</code> can be used as aliases.
    </li>

    <li><code>modern</code> (the standard compiler of JDK 1.3/1.4/1.5/1.6)
        <code>javac1.3</code> and
        <code>javac1.4</code> and
        <code>javac1.5</code> and
        <code>javac1.6</code> can be used as aliases.
    </li>

    <li><code>jikes</code> (the <a href="http://jikes.sourceforge.net/" target="_top">Jikes</a>
        compiler).
    </li>
    <li><code>jvc</code> (the Command-Line Compiler from Microsoft's SDK
        for Java / Visual J++) <code>microsoft</code> can be used
        as an alias.
    </li>

    <li><code>kjc</code> (the <a href="http://www.dms.at/kopi/" target="_top">kopi</a>
        compiler).
    </li>
    <li><code>gcj</code> (the gcj compiler from gcc).</li>
    <li><code>sj</code> (Symantec java compiler)
        <code>symantec</code> can be used as an alias.
    </li>

    <li><code>extJavac</code> (run either modern or classic in a JVM of
        its own).
    </li>
</ul>
</div>
</body>
</html>